#ifndef QEPDRIVER2_H_
#define QEPDRIVER2_H_

#define MATH_TYPE 1
#include "IQmathLib.h"         // Include header for IQmath library
#include "..\System\F2806x_Device.h"

class QEPDriver2
{	
private:
	Uint32 m_currentPosition; // QPOSCNT
	int m_Direction; 		// Motor direction: 0=CCW/reverse, 1=CW/forward
	bool m_StrobeLocked;
	
	// Speed vars
	Uint32 m_lastLatchedPos; // old latched position;
	float m_SpeedFast;
	float m_SpeedSlow;
	
	float m_ToOmega; // rad/s
	
public:
	void Init(void);
	void Calc(void);
	float GetSpeed(void);
	float GetPosition(void);
	bool IsLocked(void);
};

#endif /*  QEPDRIVER2_H_ */

